//
//  TYCOCell.m
//  TYCollectionPictures
//
//  Created by admin on 2017/1/11.
//  Copyright © 2017年 honliv. All rights reserved.
//

#import "TYCOCell.h"
@interface TYCOCell()
@property(strong,nonatomic) UIImageView *imageView;
@end
@implementation TYCOCell
-(instancetype)initWithFrame:(CGRect)frame{
    if (self = [super initWithFrame:frame]) {
        self.imageView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, frame.size.width, frame.size.height)];
        [self.contentView addSubview:self.imageView];
    }
    return self;
}
+(instancetype)TYCOCellWithCollectionView:(UICollectionView *)collectionView indexPath:(NSIndexPath *)indexPath{
    static NSString *cellId = @"TYCOCell";
    [collectionView registerClass:[TYCOCell class] forCellWithReuseIdentifier:cellId];
    TYCOCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:cellId forIndexPath:indexPath];
    return cell;
}
-(void)setIconUrl:(NSString *)iconUrl{
//    [self.imageView sd_setImageWithURL:[NSURL URLWithString:iconUrl] placeholderImage:_bitmapImage];
}

-(void)setIcon:(NSString *)icon{
    UIImage *image = [UIImage imageNamed:icon];
    self.imageView.image = image;
//    self.backgroundView =
}

@end
